home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_test / test_out1.e < prev    next >
Encoding:
Text File  |  1996-06-13  |  1001 b   |  49 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_OUT1
  5.  
  6. creation make
  7.    
  8. feature 
  9.    
  10.    make is
  11.       local
  12.      any: ANY;
  13.       do
  14.      is_true((0).out.is_equal("0"));
  15.      is_true((25).out.is_equal("25"));
  16.  
  17.      is_true((true).out.is_equal("true"));
  18.      is_true((false).out.is_equal("false"));
  19.  
  20.      is_true(('A').out.is_equal("'A'"));
  21.      is_true(('a').out.is_equal("'a'"));
  22.  
  23.      is_true((1.5).out.is_equal("1.5"));
  24.  
  25.      is_true(("foo").out.is_equal("%"foo%""));
  26.  
  27.      any := 3;
  28.      is_true(("INTEGER_REF").is_equal(any.out.substring(1,11)));
  29.  
  30.      any := 'X';
  31.      is_true(("CHARACTER_REF").is_equal(any.out.substring(1,13)));
  32.       end;
  33.    
  34.    is_true(b: BOOLEAN) is
  35.       do
  36.      cpt := cpt + 1;
  37.      if not b then
  38.         std_output.put_string("TEST_OUT1: ERROR Test # ");
  39.         std_output.put_integer(cpt);
  40.         std_output.put_string("%N");
  41.      else
  42.         -- std_output.put_string("Yes%N");
  43.      end;
  44.       end;
  45.    
  46.    cpt: INTEGER;
  47.    
  48. end -- TEST_OUT1
  49.